using System;
using System.Collections.Generic;
using System.Configuration;

namespace DogBite.Dachshund.Configuration
{
    public class DachshundSectionHandler : ConfigurationSection
    {
        [ConfigurationProperty("navigationLists")]
        [ConfigurationCollection(typeof(NavigationListCollection), AddItemName="navigationList")]
        public NavigationListCollection NavigationLists
        {
            get { return (NavigationListCollection)this["navigationLists"]; }
            set { this["navigationLists"] = value; }
        }

       

        public static NavigationList GetNavigationList(string key)
        {
            DachshundSectionHandler handler = (DachshundSectionHandler)ConfigurationManager.GetSection("dachshund");

            return handler.NavigationLists[key];
        }
    }
}
